package io.gitee.sfch.chunmi.entity;

import com.mybatisflex.annotation.Column;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 不可变实体，包含创建相关的审计字段
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ImmutableEntity extends IdEntity {

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 创建人主键
     */
    private Long creatorId;

    /**
     * 创建人，系统自动根据主键获取其值
     */
    @Column(ignore = true)
    private String creatorName;
}
